package com.seed.uaa.pojo;

import com.seed.uaa.enumeration.PermiOwner;

import java.util.List;

public class OrganizationAction extends OwnerAction {
    protected List<RoleAction> roleActions;

    public OrganizationAction(String id, String name) {
        super(PermiOwner.organization, id, name);
    }

//    protected void initRealActions() {
//        realActions = new ArrayList<>(actions);
//        for(RoleAction roleAction: roleActions) realActions.addAll(roleAction.actions);
//
//        for(AncestorAction ancestorAction: ancestorActions) {
//            List<String> ancestorHaveActions = new ArrayList<>(ancestorAction.getActions());
//            for(RoleAction roleAction: ancestorAction.getRoleActions()) {
//                ancestorHaveActions.addAll(roleAction.getActions());
//            }
//            realActions.retainAll(ancestorHaveActions);
//        }
//    }

    public List<RoleAction> getRoleActions() {
        return roleActions;
    }

    public void setRoleActions(List<RoleAction> roleActions) {
        this.roleActions = roleActions;
    }
}
